home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / proc / file.h < prev    next >
C/C++ Source or Header  |  1991-07-22  |  2KB  |  87 lines

  1. /*
  2.  * file.h --
  3.  *
  4.  *    Declarations for the file program. To port this program to a new
  5.  *    machine you have to define HOST_FMT to be the format 
  6.  *    of the new host. Look at fmt.h for supported host formats.
  7.  *
  8.  * Copyright 1989 Regents of the University of California
  9.  * Permission to use, copy, modify, and distribute this
  10.  * software and its documentation for any purpose and without
  11.  * fee is hereby granted, provided that the above copyright
  12.  * notice appear in all copies.  The University of California
  13.  * makes no representations about the suitability of this
  14.  * software for any purpose.  It is provided "as is" without
  15.  * express or implied warranty.
  16.  *
  17.  * $Header: /sprite/src/attcmds/file/RCS/file.h,v 1.5 90/10/19 15:25:43 jhh Exp Locker: shirriff $ 
  18.  */
  19.  
  20. #ifdef KERNEL
  21. #ifndef NULL
  22. #define NULL 0
  23. #endif
  24. #ifndef BUFSIZ
  25. #define BUFSIZ 4096
  26. #endif
  27. #else
  28. #include <sprite.h>
  29. #include <stdio.h>
  30. #include <stdlib.h>
  31. #endif
  32. #include <fmt.h>
  33.  
  34. #define const
  35.  
  36. #define HEADERSIZE    BUFSIZ
  37.  
  38. /*
  39.  * A rather awkward way of determining the host machine type. There should
  40.  * be one entry for each machine this program runs on.
  41.  */
  42. #if (defined(sun2) || defined(sun3))
  43. #define HOST_FMT FMT_68K_FORMAT
  44. #else
  45. #if defined(sun4)
  46. #define HOST_FMT FMT_SPARC_FORMAT
  47. #else
  48. #if defined(spur)
  49. #define HOST_FMT FMT_SPUR_FORMAT
  50. #else
  51. #if defined(ds3100)
  52. #define HOST_FMT FMT_MIPS_FORMAT
  53. #else
  54. #if defined(symm)
  55. #define HOST_FMT FMT_SYM_FORMAT
  56. #else
  57. #define HOST_FMT FMT_68K_FORMAT
  58. #endif /* symm */
  59. #endif /* ds3100 */
  60. #endif /* spur */
  61. #endif /* sun4 */
  62. #endif /* sun2/sun3 */
  63.  
  64. extern int hostFmt;
  65.  
  66. /*
  67.  * Routines to print out size of object file.
  68.  */
  69. #ifdef __STDC__
  70. extern char *machType68k(int bsize, char *buf, int *m, int *sym,
  71.     char **other);
  72. extern char *machTypeSparc(int bsize, char *buf, int *m, int *sym,
  73.     char **other);
  74. extern char *machTypeSpur(int bsize, char *buf, int *m, int *sym,
  75.     char **other);
  76. extern char *machTypeMips(int bsize, char *buf, int *m, int *sym,
  77.     char **other);
  78. extern char *machTypeSymm(int bsize, char *buf, int *m, int *sym,
  79.     char **other);
  80. #else
  81. extern char *machType68k();
  82. extern char *machTypeSparc();
  83. extern char *machTypeSpur();
  84. extern char *machTypeMips();
  85. extern char *machTypeSymm();
  86. #endif
  87.